home *** CD-ROM | disk | FTP | other *** search
/ HyperLib 1997 Winter - Disc 1 / HYPERLIB-1997-Winter-CD1.ISO.7z / HYPERLIB-1997-Winter-CD1.ISO / オンラインウェア / GAME / Xconq 7.0.1.sit / Xconq 7.0.1 / lib / starwars.g < prev    next >
Text File  |  1995-08-23  |  8KB  |  342 lines

  1. (game-module "starwars"
  2.   (title "Rebel and Empire")
  3.   (blurb "Star Wars, sort of")
  4.   (variants
  5.    (world-seen true)
  6.    (see-all false)
  7.    )
  8. )
  9.  
  10. (unit-type stormtrooper (char "s") (image-name "trooper")
  11.   (help ""))
  12. (unit-type walker (char "w") (image-name "walker")
  13.   (help ""))
  14. (unit-type hovercraft (char "h") (image-name "hovercraft")
  15.   (help ""))
  16. (unit-type x-wing (char "x") (image-name "xwing")
  17.   (help "X-wing fighter"))
  18. (unit-type tie-fighter (char "t") (image-name "tie-fighter")
  19.   (help ""))
  20. (unit-type y-wing (char "y") (image-name "ywing")
  21.   (help "Y-wing fighter-bomber"))
  22. (unit-type cruiser (char "C") (image-name "imperial-cruiser")
  23.   (help ""))
  24. (unit-type death-star (name "Death Star") (char "D") (image-name "death-star")
  25.   (help "galaxy's most feared weapon"))
  26. (unit-type town (char "*") (image-name "town22")
  27.   (help "ordinary town"))
  28. (unit-type city (char "@") (image-name "city30")
  29.   (help "immense floating city, can move around"))
  30.  
  31. (define s stormtrooper)
  32. (define w walker)
  33. (define h hovercraft)
  34. (define x x-wing)
  35. (define t tie-fighter)
  36. (define y y-wing)
  37. (define C cruiser)
  38. (define D death-star)
  39. (define * town)
  40. (define @ city)
  41.  
  42. (material-type fuel (help "basic motive power"))
  43.  
  44. (terrain-type sea (char ".") (color "sky blue"))
  45. (terrain-type plains (char "+") (color "green"))
  46. (terrain-type forest (char "%") (color "forest green"))
  47. (terrain-type desert (char "~") (color "yellow"))
  48. (terrain-type mountains (char "^") (color "sienna"))
  49. (terrain-type ice (char "_") (color "white"))
  50. (terrain-type vacuum (char ":") (color "black"))
  51.  
  52. (define cities ( * @ ))
  53. (define makers ( D * @ ))
  54. (define movers ( s w h x t y C D @ ))
  55. (define water ( sea ))
  56. (define land ( plains forest desert mountains ))
  57.  
  58. ;;; Static relationships.
  59.  
  60. (table vanishes-on
  61.   (stormtrooper vacuum true)
  62.   (walker sea true)
  63.   (cities vacuum true)
  64.   )
  65.  
  66. ;; Unit-unit capacities.
  67.  
  68. (table unit-size-as-occupant
  69.   (u* u* 100) ; disables occupancy usually
  70.   (movers cities 1)
  71.   (@ cities 100)
  72.   ;; Have to build death stars out in the open.
  73.   (D cities 100)
  74.   (( s w h x t y ) C ( 3 3 1 1 1 3 ))
  75.   (( s w h x t y ) D ( 3 3 1 1 1 3 ))
  76.   )
  77.  
  78. (add cities capacity (10 20))
  79. (add (C D) capacity (6 24))
  80.  
  81. ;;; Unit-terrain capacities.
  82.  
  83. ;; Limit units to 16 in one cell, for the sake of playability and
  84. ;; and drawability.  Places cover most of a cell, however.
  85.   
  86. (table unit-size-in-terrain
  87.   (u* t* 1)
  88.   (cities t* 12)
  89.   )
  90.  
  91. (add t* capacity 16)
  92.  
  93. ;;; Unit-material capacities.
  94.  
  95. (table unit-storage-x (u* fuel ( 30 30 30 20 22 35 200 500 200 400 )))
  96.  
  97. ;;; Vision.
  98.  
  99. (add cities see-always 1)
  100.  
  101. ;;; Actions.
  102.  
  103. ;                      s w h x t y C D * @
  104. (add u* acp-per-turn ( 3 4 6 9 8 7 6 2 1 1 ))
  105.  
  106. ;;; Movement.
  107.  
  108. (add town speed 0)
  109.  
  110. (table mp-to-enter-terrain
  111.   (u* t* 99)
  112.   (s land 1)
  113.   (w land 1)
  114.   (w ice 1)
  115.   (D t* 1)
  116.   (( h C ) t* 1)
  117.   (( x t y ) t* 1)
  118.   ;; Floating cities can move around a planet,
  119.   ;; but not into space.
  120.   (@ t* 1)
  121.   (@ vacuum 99)
  122.   )
  123.  
  124. (table consumption-per-move
  125.   (movers fuel 1)
  126.   (s fuel 0)
  127.   )
  128.  
  129. ;;; Construction.
  130.  
  131. ;            s  w  h  x  t  y  C  D  *  @
  132. (add u* cp ( 4  6  6  5  5  8 15 40  1  1 ))
  133.  
  134. (table acp-to-create
  135.   (cities movers 1)
  136.   (@ @ 0)
  137.   )
  138.  
  139. (table cp-on-creation
  140.   (cities movers 1)
  141.   (@ @ 0)
  142.   )
  143.  
  144. (table acp-to-build
  145.   (cities movers 1)
  146.   (@ @ 0)
  147.   )
  148.  
  149. (table cp-per-build
  150.   (cities movers 1)
  151.   (@ @ 0)
  152.   )
  153.  
  154. ;FIX hp-per-repair is U1 U2 -> .01HP that U1 restores to U2 per repair action
  155. ; ...and you have to add...
  156. ; acp-to-repair is U1 U2 -> ACP to do one repair action
  157. (table acp-to-repair add (makers u* 1))
  158. (table hp-per-repair add (makers u* 100))
  159. (table acp-to-repair add (( C D ) ( C D ) 1))
  160. (table hp-per-repair add (( C D ) ( C D ) 14))
  161.  
  162. ;;; Combat.
  163.  
  164. ;                s  w  h  x  t  y  C  D  *  @ 
  165. (add u* hp-max ( 1  2  1  1  1  2 10 40 20 40 ))
  166.  
  167. (table acp-to-attack
  168.   (u* u* 1)
  169.   ;; Cities may not initiate attacks.
  170.   (@ u* 0)
  171.   )
  172.  
  173. (table hit-chance
  174.   ;         s   w   h   x   t   y   C   D   *   @
  175.   (s u* (  65  40  30  20  20  30  10   5   3   5 ))
  176.   (w u* (  75  59  39  20  20  30  20  10   3   5 ))
  177.   (h u* (  50  60  80  20  20  30   0   0   3   5 ))
  178.   (x u* (  40  35  80  80  80  80  20   5  40  40 ))
  179.   (t u* (  40  25  80  80  80  80  20   5  40  40 ))
  180.   (y u* (  20  35  50  50  50  50  50  25  75  75 ))
  181.   (C u* (  20  25  80  80  80  80  80  50  90  90 ))
  182.   (D u* (  20  25  80  80  80  80  80  50  90  90 ))
  183.   (* u* (  30  20  60  80  90  50  50  50   0   0 ))
  184.   (@ u* (  50  40  60  80  90  50  50  50   0   0 ))
  185.   )
  186.  
  187. (table damage
  188.   (u* u* 1)
  189.   (( C D ) w 2)
  190.   (( C D ) ( C D ) 3)
  191.   (cities ( C D ) 4)
  192.   (( y C ) C 3)
  193.   (D D 10)
  194.   (( x t y ) D 20)
  195.   )
  196.  
  197. (table capture-chance
  198.   (s cities ( 50 30 ))
  199.   (w cities ( 40 15 ))
  200.   )
  201.  
  202. (table protection
  203.   (w cities 90)
  204.   (s cities 50)
  205.   )
  206.  
  207. ;FIX ferry-on-entry is U1 U2 -> FTYPE how much terrain U2 crosses to board U1
  208. (table ferry-on-entry add (s cities over-all))
  209.  
  210. (table consumption-per-attack add (u* fuel 1))
  211. (table hit-by add (u* fuel 1))
  212.  
  213. (add D acp-to-detonate 1)
  214.  
  215. ;; Death stars lose no hp in their detonation.
  216.  
  217. (table detonation-unit-range (D u* 8))
  218.  
  219. (table detonation-damage-at (D u* 0))
  220.  
  221. (table detonation-damage-adjacent (D u* 64))
  222.  
  223. (table detonation-terrain-range (D t* 8))
  224.  
  225. (table detonation-terrain-damage-chance
  226.   (D t* 100)
  227.   (D vacuum 0)
  228.   )
  229.  
  230. (table terrain-damaged-type
  231.   (t* vacuum 1)
  232.   (vacuum vacuum 0)
  233.   )
  234.  
  235. ;FIX "defeats" ( s w ) destroy-message
  236. ;FIX "shoots down" ( x t y ) destroy-message
  237. ;FIX "blasts out of the sky" ( C ) destroy-message
  238. ;FIX "miraculously destroys" ( D ) destroy-message
  239.  
  240. ;FIX "flattens" cities destroy-message
  241.  
  242. ;;; Other actions.
  243.  
  244. (add u* acp-to-change-side 1)
  245.  
  246. ;;; Backdrop economy.
  247.  
  248. (table base-production (cities fuel 20))
  249.  
  250. (table productivity (cities t* 100))
  251.  
  252. ;;; Scoring.
  253.  
  254. (add makers point-value ( 10 5 25 ))
  255.  
  256. ;;; Setup.
  257.  
  258. (add t* alt-percentile-min (  95  98  98  98  99   0   0 ))
  259. (add t* alt-percentile-max (  98  99  99  99 100   0  95 ))
  260. (add t* wet-percentile-min (   0  20  80   0   0   0   0 ))
  261. (add t* wet-percentile-max ( 100  80 100  20 100   0 100 ))
  262.  
  263. ;(set alt-smoothing 5)
  264.  
  265. (set edge-terrain vacuum)
  266.  
  267. (set country-radius-min 2)
  268.  
  269. (set country-separation-min 16)
  270. (set country-separation-max 100)
  271.  
  272. ;;; Of the 19 cells implied by radius of 2, require at least 12
  273. ;;; to be NON-vacuum.
  274.  
  275. (add vacuum country-terrain-max 7)
  276.  
  277. (add cities start-with (3 1))
  278.  
  279. (table independent-density (* land 100))
  280.  
  281. (table favored-terrain
  282.   (u* t* 0)
  283.   ;; Towns must be on land, preferably plains.
  284.   (* land 40)
  285.   (* plains 100)
  286.   ;; Floating city can go anywhere except space.
  287.   (@ t* 100)
  288.   (@ vacuum 0)
  289.   )
  290.  
  291. (set side-library '(
  292.   ((name "Rebellion") (noun "Rebel"))
  293.   ((name "Empire") (noun "Empire"))
  294.   ))
  295.  
  296. (add cities namer "random-starwars-town-names")
  297.  
  298. (namer random-starwars-town-names (random
  299.   "Darth Valley Junction"
  300.   "Yodaville"
  301.   "Neda"
  302.   "Ya-ya"
  303.   "Jabba"
  304.   "Ewoktown"
  305.   "Foo"
  306.   "Bar"
  307.   "Pits"
  308.   "Endor"
  309.   "Dry"
  310.   "Tatooine"
  311.   "Mjb"
  312.   "Egm"
  313.   "Star City"
  314.   "Cape Canaveral"
  315.   "Cold"
  316.   "Rebel Yell"
  317.   "Imperial"
  318.   ))
  319.  
  320. ;;; Documentation.
  321.  
  322. (game-module (notes (
  323. "Originally designed as a test, and so we could fly Death Stars around.
  324. Additional plausibility supplied by Alan Wexelblat <wex%sw.MCC.COM@MCC.COM>.
  325.  
  326.   Tweaked a little bit 1/27/92 by peterm@cory.berkeley.edu. 
  327.    I increased fuel contained
  328.   in towns and cities from 100.  I decreased accuracy of death beam from 100
  329.   to 90.  I think that 100% hits doesn't agree well with the software.
  330.  
  331.   Also added a machine strategy to get the computer players to actually
  332.   produce some of the tougher units, like C and D."
  333.   ""
  334.   "Tweaked a lot by Stan Shebs to make it work for 7.0."
  335.   )))
  336.  
  337. (game-module (instructions (
  338.   )))
  339.  
  340. (game-module (design-notes (
  341.   )))
  342.